const express = require('express')

const app = express()

app.get('/', (req, res) => {
    res.send('hi')
})

const server = app.listen(3000, () => {
    console.log('server ready')
})

process.on('SIGTERM', () => {
    server.close(() => {
        console.log('process terminated')
    })
})

console.log(process.pid)